<?php
/**
 * Created by PhpStorm.
 * User: Lenovo
 * Date: 2019/4/27
 * Time: 22:14
 */

namespace app\api\model;


class IndentModel extends BaseModel
{
    protected $table="jc_indent";

    /**
     * 查询第一条数据
     * @param unknown $condition
     */
    public function getFirstData($condition, $order)
    {
        $data = $this->where($condition)->order($order)
            ->limit(1)->select();
        if(!empty($data))
        {
            return $data[0];
        }else
            return '';
    }
}